*     *****************************************************************   *;
*     *****************************************************************   *; 
*   Date:          December 27, 2021                               	      *;
*   Authors:       Lisa Dellmuth and Jonas Tallberg				          *;   
*   Purpose: 	   Analyses for book Legitimacy Politics: Elite  		  *;
*    Communication and Public Opinion in Global Governance (CUP, 2023)    *;
*     ****************************************************************    *;
*     ****************************************************************    *;


set more off

* GERMANY
*
use SE59spring2003.dta //note: change name (or change here, also below)
tab v11
tab v11, nolab
keep if v11 == 4 //Germany only
gen year = 2003
keep v4 v5 v7 v11 v12 v62 v64 year
replace v4 = 591 //Survey
tab v62, mi
tab v62, mi nolab
replace v62 = 3 if v62 == .d //Don't know
tab v64, mi
tab v64, mi nolab
replace v64 = 3 if v64 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v7 country
rename v11 germany
rename v12 weight
rename v62 trustgov
rename v64 trusteu
save GERse59spring2003.dta, replace
*
use SE60fall2003.dta
tab v10
tab v10, nolab
keep if v10 == 4 //Ger
gen year = 2003
keep v4 v5 isocntry v10 v11 v54 v56 year
replace v4 = 601 //EB no
tab v54, mi
tab v54, mi nolab
replace v54 = 3 if v54 == .d //Don't know
tab v56, mi
tab v56, mi nolab
replace v56 = 3 if v56 == .d //Don't know
rename v4 survey
rename v5 id
rename isocntry country
rename v10 germany
rename v11 weight
rename v54 trustgov
rename v56 trusteu
save GERse60fall2003.dta, replace
*
use SE61spring2004.dta
tab v10
tab v10, nolab
keep if v10 == 4 //Ger
gen year = 2004
keep v4 v5 isocntry v10 v11 v55 v57 year
replace v4 = 610 //EB no
tab v55, mi
tab v55, mi nolab
replace v55 = 3 if v55 == .d //Don't know
tab v57, mi
tab v57, mi nolab
replace v57 = 3 if v57 == .d //Don't know
rename v4 survey
rename v5 id
rename isocntry country
rename v10 germany
rename v11 weight
rename v55 trustgov
rename v57 trusteu
save GERse61spring2004.dta, replace
*
use SE62fall2004.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2004
keep v4 v5 v7 v11 v12 v93 v95 year
replace v4 = 620 //EB no
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v93 trustgov
rename v95 trusteu
save GERse62fall2004.dta, replace
*
use SE63spring2005.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2005
replace v4 = 634 //EB no
keep v4 v5 v7 v11 v12 v79 v81 year
tab v79, mi
tab v79, mi nolab
replace v79 = 3 if v79 == .d //Don't know
tab v81, mi
tab v81, mi nolab
replace v81 = 3 if v81 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v79 trustgov
rename v81 trusteu
save GERse63spring2005.dta, replace
*
use SE64fall2005.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2005
replace v4 = 642
keep v4 v5 v7 v11 v12 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v93 trustgov
rename v95 trusteu
save GERse64fall2005.dta, replace
*
use SE65spring2006.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2006
replace v4 = 652
keep v4 v5 v7 v11 v12 v89 v91 year
tab v91, mi
tab v91, mi nolab
replace v91 = 3 if v91 == .d //Don't know (for some reason already coded "3" for national government)
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v89 trustgov
rename v91 trusteu
save GERse65spring2006.dta, replace
*
use SE66fall2006.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2006
keep v4 v5 v7 v11 v12 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v93 trustgov
rename v95 trusteu
save GERse66fall2006.dta, replace
*
use SE67spring2007.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2007
keep v4 v5 v7 v11 v12 v162 v164 year
tab v162, mi
tab v162, mi nolab
replace v162 = 3 if v162 == .d //Don't know
tab v164, mi
tab v164, mi nolab
replace v164 = 3 if v164 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v162 trustgov
rename v164 trusteu
save GERse67spring2007.dta, replace
*
use SE68fall2007.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2007
keep v4 v5 v7 v11 v12 v150 v152 year
tab v150, mi
tab v150, mi nolab
replace v150 = 3 if v150 == .d //Don't know
tab v152, mi
tab v152, mi nolab
replace v152 = 3 if v152 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v150 trustgov
rename v152 trusteu
save GERse68fall2007.dta, replace
*
use SE69spring2008.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2008
keep v4 v5 v7 v11 v12 v213 v215 year
tab v213, mi
tab v213, mi nolab
replace v213 = 3 if v213 == .d //Don't know
tab v215, mi
tab v215, mi nolab
replace v215 = 3 if v215 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v213 trustgov
rename v215 trusteu
save GERse69spring2008.dta, replace
*
use SE70fall2008.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2008
keep v4 v5 v7 v11 v12 v228 v230 year
tab v228, mi
tab v228, mi nolab
replace v228 = 3 if v228 == .d //Don't know
tab v230, mi
tab v230, mi nolab
replace v230 = 3 if v230 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v228 trustgov
rename v230 trusteu
save GERse70fall2008.dta, replace
*
use SE71spring2009.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2009
keep v4 v5 v7 v11 v12 v217 v219 year
tab v217, mi
tab v217, mi nolab
replace v217 = 3 if v217 == .d //Don't know
tab v219, mi
tab v219, mi nolab
replace v219 = 3 if v219 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v217 trustgov
rename v219 trusteu
save GERse71spring2009.dta, replace
*
use SE72fall2009.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2009
keep v4 v5 v7 v11 v12 v214 v216 year
tab v214, mi
tab v214, mi nolab
replace v214 = 3 if v214 == .d //Don't know
tab v216, mi
tab v216, mi nolab
replace v216 = 3 if v216 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v214 trustgov
rename v216 trusteu
save GERse72fall2009.dta, replace
*
use SE73spring2010.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2010
keep v4 v5 v7 v11 v12 v271 v273 year
tab v271, mi
tab v271, mi nolab
replace v271 = 3 if v271 == .d //Don't know
tab v273, mi
tab v273, mi nolab
replace v273 = 3 if v273 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v271 trustgov
rename v273 trusteu
save GERse73spring2010.dta, replace
*
use SE74fall2010.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2010
keep v4 v5 v7 v11 v12 v300 v302 year
tab v300, mi
tab v300, mi nolab
replace v300 = 3 if v300 == .d //Don't know
tab v302, mi
tab v302, mi nolab
replace v302 = 3 if v302 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v300 trustgov
rename v302 trusteu
save GERse74fall2010.dta, replace
*
use SE75spring2011.dta
tab v11
tab v11, nolab
keep if v11 == 1
gen year = 2011
keep v4 v5 v7 v11 v12 v310 v312 year
tab v310, mi
tab v310, mi nolab
replace v310 = 3 if v310 == .d //Don't know
tab v312, mi
tab v312, mi nolab
replace v312 = 3 if v312 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v11 germany
rename v12 weight
rename v310 trustgov
rename v312 trusteu
save GERse75spring2011.dta, replace
*
use SE76fall2011.dta
tab de
tab de, nol
keep if de == 1
gen year = 2011
keep survey uniqid isocntry de w3 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename isocntry country
rename de germany
rename w3 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save GERse76fall2011.dta, replace
*
use SE77spring2012.dta
tab de
tab de, nolab
keep if de == 1
gen year = 2012
keep survey uniqid isocntry de w3 qa13_2 qa13_4 year
tab qa13_2, mi
tab qa13_2, mi nolab
replace qa13_2 = 3 if qa13_2 == .d //Don't know
tab qa13_4, mi
tab qa13_4, mi nolab
replace qa13_4 = 3 if qa13_4 == .d //Don't know
rename uniqid id
rename isocntry country
rename de germany
rename w3 weight
rename qa13_2 trustgov
rename qa13_4 trusteu
save GERse77spring2012.dta, replace
*
use SE78fall2012.dta
tab de
tab de, nolab
keep if de == 1
gen year = 2012
keep survey uniqid isocntry de w3 qa11_6 qa11_8 year
tab qa11_6, mi
tab qa11_6, mi nolab
replace qa11_6 = 3 if qa11_6 == .d //Don't know
tab qa11_8, mi
tab qa11_8, mi nolab
replace qa11_8 = 3 if qa11_8 == .d //Don't know
rename uniqid id
rename isocntry country
rename de germany
rename w3 weight
rename qa11_6 trustgov
rename qa11_8 trusteu
save GERse78fall2012.dta, replace
*
use SE79spring2013.dta
tab de
tab de, nolab
keep if de == 1
gen year = 2013
keep survey uniqid isocntry de w3 qa12_2 qa12_4 year
tab qa12_2, mi
tab qa12_2, mi nolab
replace qa12_2 = 3 if qa12_2 == .d //Don't know
tab qa12_4, mi
tab qa12_4, mi nolab
replace qa12_4 = 3 if qa12_4 == .d //Don't know
rename uniqid id
rename isocntry country
rename de germany
rename w3 weight
rename qa12_2 trustgov
rename qa12_4 trusteu
save GERse79spring2013.dta, replace
*
use SE80fall2013.dta
tab de
tab de, nolab
keep if de == 1
gen year = 2013
keep survey uniqid isocntry de w3 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename isocntry country
rename de germany
rename w3 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save GERse80fall2013.dta, replace
*
use SE81spring2014.dta
tab cntry_de
tab cntry_de, nolab
keep if cntry_de == 1
gen year = 2014
keep survey uniqid isocntry cntry_de w3 qa9_2 qa9_4 year
rename uniqid id
rename isocntry country
rename cntry_de germany
rename w3 weight
rename qa9_2 trustgov
rename qa9_4 trusteu
save GERse81spring2014.dta, replace
*
use SE82fall2014.dta
tab cntry_de
tab cntry_de, nolab
keep if cntry_de == 1
gen year = 2014
keep survey uniqid isocntry cntry_de w3 qa8a_11 qa8a_13 year
rename uniqid id
rename isocntry country
rename cntry_de germany
rename w3 weight
rename qa8a_11 trustgov
rename qa8a_13 trusteu
save GERse82fall2014.dta, replace
*
use SE83spring2015.dta
tab cntry_de
tab cntry_de, nolab
keep if cntry_de == 1
gen year = 2015
keep survey uniqid isocntry cntry_de w3 qa8a_6 qa8a_8 year
rename uniqid id
rename isocntry country
rename cntry_de germany
rename w3 weight
rename qa8a_6 trustgov
rename qa8a_8 trusteu
save GERse83spring2015.dta, replace
*
use SE84fall2015.dta
tab cntry_de
tab cntry_de, nolab
keep if cntry_de == 1
gen year = 2015
keep survey uniqid isocntry cntry_de w3 qa8a_8 qa8a_10 year
rename uniqid id
rename isocntry country
rename cntry_de germany
rename w3 weight
rename qa8a_8 trustgov
rename qa8a_10 trusteu
save GERse84fall2015.dta, replace
*
use SE85spring2016.dta
tab cntry_de
tab cntry_de, nolab
keep if cntry_de == 1
gen year = 2016
keep survey uniqid isocntry cntry_de w3 qa8a_7 qa8a_9 year
rename uniqid id
rename isocntry country
rename cntry_de germany
rename w3 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save GERse85spring2016.dta, replace
*
use SE86fall2016.dta
tab cntry_de
tab cntry_de, nolab
keep if cntry_de == 1
gen year = 2016
keep survey uniqid isocntry cntry_de w3 qa8a_12 qa8a_14 year
rename uniqid id
rename isocntry country
rename cntry_de germany
rename w3 weight
rename qa8a_12 trustgov
rename qa8a_14 trusteu
save GERse86fall2016.dta, replace
*
use SE87spring2017.dta
tab cntry_de
tab cntry_de, nolab
keep if cntry_de == 1
gen year = 2017
keep survey uniqid isocntry cntry_de w3 qa8a_7 qa8a_9 year
rename uniqid id
rename isocntry country
rename cntry_de germany
rename w3 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save GERse87spring2017.dta, replace
*
*
* Appending Germany (combining to one dataset)
use GERse59spring2003.dta, clear
append using GERse60fall2003.dta, nolab
save GERappended.dta, replace
append using GERse61spring2004.dta, nolab
save GERappended.dta, replace
append using GERse62fall2004.dta, nolab
save GERappended.dta, replace
append using GERse63spring2005.dta, nolab
save GERappended.dta, replace
append using GERse64fall2005.dta, nolab
save GERappended.dta, replace
append using GERse65spring2006.dta, nolab
save GERappended.dta, replace
append using GERse66fall2006.dta, nolab
save GERappended.dta, replace
append using GERse67spring2007.dta, nolab
save GERappended.dta, replace
append using GERse68fall2007.dta, nolab
save GERappended.dta, replace
append using GERse69spring2008.dta, nolab
save GERappended.dta, replace
append using GERse70fall2008.dta, nolab
save GERappended.dta, replace
append using GERse71spring2009.dta, nolab
save GERappended.dta, replace
append using GERse72fall2009.dta, nolab
save GERappended.dta, replace
append using GERse73spring2010.dta, nolab
save GERappended.dta, replace
append using GERse74fall2010.dta, nolab
save GERappended.dta, replace
append using GERse75spring2011.dta, nolab
save GERappended.dta, replace
append using GERse76fall2011.dta, nolab
save GERappended.dta, replace
append using GERse77spring2012.dta, nolab
save GERappended.dta, replace
append using GERse78fall2012.dta, nolab
save GERappended.dta, replace
append using GERse79spring2013.dta, nolab
save GERappended.dta, replace
append using GERse80fall2013.dta, nolab
save GERappended.dta, replace
append using GERse81spring2014.dta, nolab
save GERappended.dta, replace
append using GERse82fall2014.dta, nolab
save GERappended.dta, replace
append using GERse83spring2015.dta, nolab
save GERappended.dta, replace
append using GERse84fall2015.dta, nolab
save GERappended.dta, replace
append using GERse85spring2016.dta, nolab
save GERappended.dta, replace
append using GERse86fall2016.dta, nolab
save GERappended.dta, replace
append using GERse87spring2017.dta, nolab
save GERappended.dta, replace
*
*
tab trusteu
generate gerdummytrusteu = 0 if trusteu == 2 // Tend not to trust
replace gerdummytrusteu = 1 if trusteu == 1 //Tend to trust EU
generate gerdummytrustgov = 0 if trustgov == 2 //Tend not to trust
replace gerdummytrustgov = 1 if trustgov == 1 //Tend to trust government
*
collapse (mean) gerdummytrusteu gerdummytrustgov [pweight=weight], by(year) //weight on (united) country level
save GERcollapsed.dta, replace
*
//graph twoway (line gerdummytrusteu year)
*
*



* United Kingdom
set more off
*

*
*
use SE59spring2003.dta
tab v9
tab v9, nolab
keep if v9 == 9 //UK only
gen year = 2003
keep v4 v5 v7 v9 v10 v62 v64 year
replace v4 = 591 //Survey
tab v62, mi
tab v62, mi nolab
replace v62 = 3 if v62 == .d //Don't know
tab v64, mi
tab v64, mi nolab
replace v64 = 3 if v64 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v62 trustgov
rename v64 trusteu
save UKse59spring2003.dta, replace
*
use SE60fall2003.dta
tab v6
tab v6, nolab
keep if v6 == 9
gen year = 2003
keep v4 v5 isocntry v6 v7 v54 v56 year
replace v4 = 601 //EB no
tab v54, mi
tab v54, mi nolab
replace v54 = 3 if v54 == .d //Don't know
tab v56, mi
tab v56, mi nolab
replace v56 = 3 if v56 == .d //Don't know
rename v4 survey
rename v5 id
rename isocntry country
rename v6 uk
rename v7 weight
rename v54 trustgov
rename v56 trusteu
save UKse60fall2003.dta, replace
*
use SE61spring2004.dta
tab v6
tab v6, nolab
keep if v6 == 9 //UK
gen year = 2004
keep v4 v5 isocntry v6 v7 v55 v57 year
replace v4 = 610 //EB no
tab v55, mi
tab v55, mi nolab
replace v55 = 3 if v55 == .d //Don't know
tab v57, mi
tab v57, mi nolab
replace v57 = 3 if v57 == .d //Don't know
rename v4 survey
rename v5 id
rename isocntry country
rename v6 uk
rename v7 weight
rename v55 trustgov
rename v57 trusteu
save UKse61spring2004.dta, replace
*
use SE62fall2004.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2004
keep v4 v5 v7 v9 v10 v93 v95 year
replace v4 = 620 //EB no
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v93 trustgov
rename v95 trusteu
save UKse62fall2004.dta, replace
*
use SE63spring2005.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2005
replace v4 = 634 //EB no
keep v4 v5 v7 v9 v10 v79 v81 year
tab v79, mi
tab v79, mi nolab
replace v79 = 3 if v79 == .d //Don't know
tab v81, mi
tab v81, mi nolab
replace v81 = 3 if v81 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v79 trustgov
rename v81 trusteu
save UKse63spring2005.dta, replace
*
use SE64fall2005.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2005
replace v4 = 642
keep v4 v5 v7 v9 v10 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v93 trustgov
rename v95 trusteu
save UKse64fall2005.dta, replace
*
use SE65spring2006.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2006
replace v4 = 652
keep v4 v5 v7 v9 v10 v89 v91 year
tab v91, mi
tab v91, mi nolab
replace v91 = 3 if v91 == .d //Don't know (for some reason already coded "3" for national government)
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v89 trustgov
rename v91 trusteu
save UKse65spring2006.dta, replace
*
use SE66fall2006.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2006
keep v4 v5 v7 v9 v10 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v93 trustgov
rename v95 trusteu
save UKse66fall2006.dta, replace
*
use SE67spring2007.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2007
keep v4 v5 v7 v9 v10 v162 v164 year
tab v162, mi
tab v162, mi nolab
replace v162 = 3 if v162 == .d //Don't know
tab v164, mi
tab v164, mi nolab
replace v164 = 3 if v164 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v162 trustgov
rename v164 trusteu
save UKse67spring2007.dta, replace
*
use SE68fall2007.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2007
keep v4 v5 v7 v9 v10 v150 v152 year
tab v150, mi
tab v150, mi nolab
replace v150 = 3 if v150 == .d //Don't know
tab v152, mi
tab v152, mi nolab
replace v152 = 3 if v152 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v150 trustgov
rename v152 trusteu
save UKse68fall2007.dta, replace
*
use SE69spring2008.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2008
keep v4 v5 v7 v9 v10 v213 v215 year
tab v213, mi
tab v213, mi nolab
replace v213 = 3 if v213 == .d //Don't know
tab v215, mi
tab v215, mi nolab
replace v215 = 3 if v215 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v213 trustgov
rename v215 trusteu
save UKse69spring2008.dta, replace
*
use SE70fall2008.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2008
keep v4 v5 v7 v9 v10 v228 v230 year
tab v228, mi
tab v228, mi nolab
replace v228 = 3 if v228 == .d //Don't know
tab v230, mi
tab v230, mi nolab
replace v230 = 3 if v230 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v228 trustgov
rename v230 trusteu
save UKse70fall2008.dta, replace
*
use SE71spring2009.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2009
keep v4 v5 v7 v9 v10 v217 v219 year
tab v217, mi
tab v217, mi nolab
replace v217 = 3 if v217 == .d //Don't know
tab v219, mi
tab v219, mi nolab
replace v219 = 3 if v219 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v217 trustgov
rename v219 trusteu
save UKse71spring2009.dta, replace
*
use SE72fall2009.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2009
keep v4 v5 v7 v9 v10 v214 v216 year
tab v214, mi
tab v214, mi nolab
replace v214 = 3 if v214 == .d //Don't know
tab v216, mi
tab v216, mi nolab
replace v216 = 3 if v216 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v214 trustgov
rename v216 trusteu
save UKse72fall2009.dta, replace
*
use SE73spring2010.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2010
keep v4 v5 v7 v9 v10 v271 v273 year
tab v271, mi
tab v271, mi nolab
replace v271 = 3 if v271 == .d //Don't know
tab v273, mi
tab v273, mi nolab
replace v273 = 3 if v273 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v271 trustgov
rename v273 trusteu
save UKse73spring2010.dta, replace
*
use SE74fall2010.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2010
keep v4 v5 v7 v9 v10 v300 v302 year
tab v300, mi
tab v300, mi nolab
replace v300 = 3 if v300 == .d //Don't know
tab v302, mi
tab v302, mi nolab
replace v302 = 3 if v302 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v300 trustgov
rename v302 trusteu
save UKse74fall2010.dta, replace
*
use SE75spring2011.dta
tab v9
tab v9, nolab
keep if v9 == 1
gen year = 2011
keep v4 v5 v7 v9 v10 v310 v312 year
tab v310, mi
tab v310, mi nolab
replace v310 = 3 if v310 == .d //Don't know
tab v312, mi
tab v312, mi nolab
replace v312 = 3 if v312 == .d //Don't know
rename v4 survey
rename v5 id
rename v7 country
rename v9 uk
rename v10 weight
rename v310 trustgov
rename v312 trusteu
save UKse75spring2011.dta, replace
*
use SE76fall2011.dta
tab gb
tab gb, nol
keep if gb == 1
gen year = 2011
keep survey uniqid isocntry gb w4 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename isocntry country
rename gb uk
rename w4 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save UKse76fall2011.dta, replace
*
use SE77spring2012.dta
tab gb
tab gb, nolab
keep if gb == 1
gen year = 2012
keep survey uniqid isocntry gb w4 qa13_2 qa13_4 year
tab qa13_2, mi
tab qa13_2, mi nolab
replace qa13_2 = 3 if qa13_2 == .d //Don't know
tab qa13_4, mi
tab qa13_4, mi nolab
replace qa13_4 = 3 if qa13_4 == .d //Don't know
rename uniqid id
rename isocntry country
rename gb uk
rename w4 weight
rename qa13_2 trustgov
rename qa13_4 trusteu
save UKse77spring2012.dta, replace
*
use SE78fall2012.dta
tab gb
tab gb, nolab
keep if gb == 1
gen year = 2012
keep survey uniqid isocntry gb w4 qa11_6 qa11_8 year
tab qa11_6, mi
tab qa11_6, mi nolab
replace qa11_6 = 3 if qa11_6 == .d //Don't know
tab qa11_8, mi
tab qa11_8, mi nolab
replace qa11_8 = 3 if qa11_8 == .d //Don't know
rename uniqid id
rename isocntry country
rename gb uk
rename w4 weight
rename qa11_6 trustgov
rename qa11_8 trusteu
save UKse78fall2012.dta, replace
*
use SE79spring2013.dta
tab gb
tab gb, nolab
keep if gb == 1
gen year = 2013
keep survey uniqid isocntry gb w4 qa12_2 qa12_4 year
tab qa12_2, mi
tab qa12_2, mi nolab
replace qa12_2 = 3 if qa12_2 == .d //Don't know
tab qa12_4, mi
tab qa12_4, mi nolab
replace qa12_4 = 3 if qa12_4 == .d //Don't know
rename uniqid id
rename isocntry country
rename gb uk
rename w4 weight
rename qa12_2 trustgov
rename qa12_4 trusteu
save UKse79spring2013.dta, replace
*
use SE80fall2013.dta
tab gb
tab gb, nolab
keep if gb == 1
gen year = 2013
keep survey uniqid isocntry gb w4 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename isocntry country
rename gb uk
rename w4 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save UKse80fall2013.dta, replace
*
use SE81spring2014.dta
tab cntry_gb
tab cntry_gb, nolab
keep if cntry_gb == 1
gen year = 2014
keep survey uniqid isocntry cntry_gb w4 qa9_2 qa9_4 year
rename uniqid id
rename isocntry country
rename cntry_gb uk
rename w4 weight
rename qa9_2 trustgov
rename qa9_4 trusteu
save UKse81spring2014.dta, replace
*
use SE82fall2014.dta
tab cntry_gb
tab cntry_gb, nolab
keep if cntry_gb == 1
gen year = 2014
keep survey uniqid isocntry cntry_gb w4 qa8a_11 qa8a_13 year
rename uniqid id
rename isocntry country
rename cntry_gb uk
rename w4 weight
rename qa8a_11 trustgov
rename qa8a_13 trusteu
save UKse82fall2014.dta, replace
*
use SE83spring2015.dta
tab cntry_gb
tab cntry_gb, nolab
keep if cntry_gb == 1
gen year = 2015
keep survey uniqid isocntry cntry_gb w4 qa8a_6 qa8a_8 year
rename uniqid id
rename isocntry country
rename cntry_gb uk
rename w4 weight
rename qa8a_6 trustgov
rename qa8a_8 trusteu
save UKse83spring2015.dta, replace
*
use SE84fall2015.dta
tab cntry_gb
tab cntry_gb, nolab
keep if cntry_gb == 1
gen year = 2015
keep survey uniqid isocntry cntry_gb w4 qa8a_8 qa8a_10 year
rename uniqid id
rename isocntry country
rename cntry_gb uk
rename w4 weight
rename qa8a_8 trustgov
rename qa8a_10 trusteu
save UKse84fall2015.dta, replace
*
use SE85spring2016.dta
tab cntry_gb
tab cntry_gb, nolab
keep if cntry_gb == 1
gen year = 2016
keep survey uniqid isocntry cntry_gb w4 qa8a_7 qa8a_9 year
rename uniqid id
rename isocntry country
rename cntry_gb uk
rename w4 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save UKse85spring2016.dta, replace
*
use SE86fall2016.dta
tab cntry_gb
tab cntry_gb, nolab
keep if cntry_gb == 1
gen year = 2016
keep survey uniqid isocntry cntry_gb w4 qa8a_12 qa8a_14 year
rename uniqid id
rename isocntry country
rename cntry_gb uk
rename w4 weight
rename qa8a_12 trustgov
rename qa8a_14 trusteu
save UKse86fall2016.dta, replace
*
use SE87spring2017.dta
tab cntry_gb
tab cntry_gb, nolab
keep if cntry_gb == 1
gen year = 2017
keep survey uniqid isocntry cntry_gb w4 qa8a_7 qa8a_9 year
rename uniqid id
rename isocntry country
rename cntry_gb uk
rename w4 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save UKse87spring2017.dta, replace
*
*
* Appending UK (combining to one dataset)
use UKse59spring2003.dta, clear
append using UKse60fall2003.dta, nolab
save UKappended.dta, replace
append using UKse61spring2004.dta, nolab
save UKappended.dta, replace
append using UKse62fall2004.dta, nolab
save UKappended.dta, replace
append using UKse63spring2005.dta, nolab
save UKappended.dta, replace
append using UKse64fall2005.dta, nolab
save UKappended.dta, replace
append using UKse65spring2006.dta, nolab
save UKappended.dta, replace
append using UKse66fall2006.dta, nolab
save UKappended.dta, replace
append using UKse67spring2007.dta, nolab
save UKappended.dta, replace
append using UKse68fall2007.dta, nolab
save UKappended.dta, replace
append using UKse69spring2008.dta, nolab
save UKappended.dta, replace
append using UKse70fall2008.dta, nolab
save UKappended.dta, replace
append using UKse71spring2009.dta, nolab
save UKappended.dta, replace
append using UKse72fall2009.dta, nolab
save UKappended.dta, replace
append using UKse73spring2010.dta, nolab
save UKappended.dta, replace
append using UKse74fall2010.dta, nolab
save UKappended.dta, replace
append using UKse75spring2011.dta, nolab
save UKappended.dta, replace
append using UKse76fall2011.dta, nolab
save UKappended.dta, replace
append using UKse77spring2012.dta, nolab
save UKappended.dta, replace
append using UKse78fall2012.dta, nolab
save UKappended.dta, replace
append using UKse79spring2013.dta, nolab
save UKappended.dta, replace
append using UKse80fall2013.dta, nolab
save UKappended.dta, replace
append using UKse81spring2014.dta, nolab
save UKappended.dta, replace
append using UKse82fall2014.dta, nolab
save UKappended.dta, replace
append using UKse83spring2015.dta, nolab
save UKappended.dta, replace
append using UKse84fall2015.dta, nolab
save UKappended.dta, replace
append using UKse85spring2016.dta, nolab
save UKappended.dta, replace
append using UKse86fall2016.dta, nolab
save UKappended.dta, replace
append using UKse87spring2017.dta, nolab
save UKappended.dta, replace
*
generate ukdummytrusteu = 0 if trusteu == 2 // Tend not to trust
replace ukdummytrusteu = 1 if trusteu == 1 //Tend to trust EU
generate ukdummytrustgov = 0 if trustgov == 2 // Tend not to trust
replace ukdummytrustgov = 1 if trustgov == 1 //Tend to trust government
*
collapse (mean) ukdummytrusteu ukdummytrustgov [pweight=weight], by(year) //weight on (united) country level
save UKcollapsed.dta, replace
**
** // graph twoway (line gerdummytrusteu year)
**



**
** FRANCE

*
*
use SE59spring2003.dta
tab v6
tab v6, nolab
keep if v6 == 1 //France only
gen year = 2003
keep v4 v5 v6 v8 v62 v64 year
replace v4 = 591 //Survey
tab v62, mi
tab v62, mi nolab
replace v62 = 3 if v62 == .d //Don't know
tab v64, mi
tab v64, mi nolab
replace v64 = 3 if v64 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v62 trustgov
rename v64 trusteu
save FRAse59spring2003.dta, replace
*
use SE60fall2003.dta
tab isocntry
tab isocntry, nolab
keep if isocntry == "FR" //Fra
gen year = 2003
keep v4 v5 v9 v54 v56 year
replace v4 = 601 //EB no
tab v54, mi
tab v54, mi nolab
replace v54 = 3 if v54 == .d //Don't know
tab v56, mi
tab v56, mi nolab
replace v56 = 3 if v56 == .d //Don't know
rename v4 survey
rename v5 id
rename v9 weight
rename v54 trustgov
rename v56 trusteu
save FRAse60fall2003.dta, replace
*
use SE61spring2004.dta
tab isocntry
tab isocntry, nolab
keep if isocntry == "FR" //Fra
gen year = 2004
keep v4 v5 v9 v55 v57 year
replace v4 = 610 //EB no
tab v55, mi
tab v55, mi nolab
replace v55 = 3 if v55 == .d //Don't know
tab v57, mi
tab v57, mi nolab
replace v57 = 3 if v57 == .d //Don't know
rename v4 survey
rename v5 id
rename v9 weight
rename v55 trustgov
rename v57 trusteu
save FRAse61spring2004.dta, replace
*
use SE62fall2004.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2004
keep v4 v5 v6 v8 v93 v95 year
replace v4 = 620 //EB no
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v93 trustgov
rename v95 trusteu
save FRAse62fall2004.dta, replace
*
use SE63spring2005.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2005
replace v4 = 634 //EB no
keep v4 v5 v6 v8 v79 v81 year
tab v79, mi
tab v79, mi nolab
replace v79 = 3 if v79 == .d //Don't know
tab v81, mi
tab v81, mi nolab
replace v81 = 3 if v81 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v79 trustgov
rename v81 trusteu
save FRAse63spring2005.dta, replace
*
use SE64fall2005.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2005
replace v4 = 642
keep v4 v5 v6 v8 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v93 trustgov
rename v95 trusteu
save FRAse64fall2005.dta, replace
*
use SE65spring2006.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2006
replace v4 = 652
keep v4 v5 v6 v8 v89 v91 year
tab v91, mi
tab v91, mi nolab
replace v91 = 3 if v91 == .d //Don't know (for some reason already coded "3" for national government)
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v89 trustgov
rename v91 trusteu
save FRAse65spring2006.dta, replace
*
use SE66fall2006.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2006
keep v4 v5 v6 v8 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v93 trustgov
rename v95 trusteu
save FRAse66fall2006.dta, replace
*
use SE67spring2007.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2007
keep v4 v5 v6 v8 v162 v164 year
tab v162, mi
tab v162, mi nolab
replace v162 = 3 if v162 == .d //Don't know
tab v164, mi
tab v164, mi nolab
replace v164 = 3 if v164 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v162 trustgov
rename v164 trusteu
save FRAse67spring2007.dta, replace
*
use SE68fall2007.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2007
keep v4 v5 v6 v8 v150 v152 year
tab v150, mi
tab v150, mi nolab
replace v150 = 3 if v150 == .d //Don't know
tab v152, mi
tab v152, mi nolab
replace v152 = 3 if v152 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v150 trustgov
rename v152 trusteu
save FRAse68fall2007.dta, replace
*
use SE69spring2008.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2008
keep v4 v5 v6 v8 v213 v215 year
tab v213, mi
tab v213, mi nolab
replace v213 = 3 if v213 == .d //Don't know
tab v215, mi
tab v215, mi nolab
replace v215 = 3 if v215 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v213 trustgov
rename v215 trusteu
save FRAse69spring2008.dta, replace
*
use SE70fall2008.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2008
keep v4 v5 v6 v8 v228 v230 year
tab v228, mi
tab v228, mi nolab
replace v228 = 3 if v228 == .d //Don't know
tab v230, mi
tab v230, mi nolab
replace v230 = 3 if v230 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v228 trustgov
rename v230 trusteu
save FRAse70fall2008.dta, replace
*
use SE71spring2009.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2009
keep v4 v5 v6 v8 v217 v219 year
tab v217, mi
tab v217, mi nolab
replace v217 = 3 if v217 == .d //Don't know
tab v219, mi
tab v219, mi nolab
replace v219 = 3 if v219 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v217 trustgov
rename v219 trusteu
save FRAse71spring2009.dta, replace
*
use SE72fall2009.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2009
keep v4 v5 v6 v8 v214 v216 year
tab v214, mi
tab v214, mi nolab
replace v214 = 3 if v214 == .d //Don't know
tab v216, mi
tab v216, mi nolab
replace v216 = 3 if v216 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v214 trustgov
rename v216 trusteu
save FRAse72fall2009.dta, replace
*
use SE73spring2010.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2010
keep v4 v5 v6 v8 v271 v273 year
tab v271, mi
tab v271, mi nolab
replace v271 = 3 if v271 == .d //Don't know
tab v273, mi
tab v273, mi nolab
replace v273 = 3 if v273 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v271 trustgov
rename v273 trusteu
save FRAse73spring2010.dta, replace
*
use SE74fall2010.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2010
keep v4 v5 v6 v8 v300 v302 year
tab v300, mi
tab v300, mi nolab
replace v300 = 3 if v300 == .d //Don't know
tab v302, mi
tab v302, mi nolab
replace v302 = 3 if v302 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v300 trustgov
rename v302 trusteu
save FRAse74fall2010.dta, replace
*
use SE75spring2011.dta
tab v6
tab v6, nolab
keep if v6 == 1
gen year = 2011
keep v4 v5 v6 v8 v310 v312 year
tab v310, mi
tab v310, mi nolab
replace v310 = 3 if v310 == .d //Don't know
tab v312, mi
tab v312, mi nolab
replace v312 = 3 if v312 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v310 trustgov
rename v312 trusteu
save FRAse75spring2011.dta, replace
*
use SE76fall2011.dta
tab country
tab country, nol
keep if country == 1
gen year = 2011
keep survey uniqid country w1 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save FRAse76fall2011.dta, replace
*
use SE77spring2012.dta
tab country
tab country, nol
keep if country == 1
gen year = 2012
keep survey uniqid country w1 qa13_2 qa13_4 year
tab qa13_2, mi
tab qa13_2, mi nolab
replace qa13_2 = 3 if qa13_2 == .d //Don't know
tab qa13_4, mi
tab qa13_4, mi nolab
replace qa13_4 = 3 if qa13_4 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa13_2 trustgov
rename qa13_4 trusteu
save FRAse77spring2012.dta, replace
*
use SE78fall2012.dta
tab country
tab country, nol
keep if country == 1
gen year = 2012
keep survey uniqid country w1 qa11_6 qa11_8 year
tab qa11_6, mi
tab qa11_6, mi nolab
replace qa11_6 = 3 if qa11_6 == .d //Don't know
tab qa11_8, mi
tab qa11_8, mi nolab
replace qa11_8 = 3 if qa11_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa11_6 trustgov
rename qa11_8 trusteu
save FRAse78fall2012.dta, replace
*
use SE79spring2013.dta
tab country
tab country, nol
keep if country == 1
gen year = 2013
keep survey uniqid country w1 qa12_2 qa12_4 year
tab qa12_2, mi
tab qa12_2, mi nolab
replace qa12_2 = 3 if qa12_2 == .d //Don't know
tab qa12_4, mi
tab qa12_4, mi nolab
replace qa12_4 = 3 if qa12_4 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa12_2 trustgov
rename qa12_4 trusteu
save FRAse79spring2013.dta, replace
*
use SE80fall2013.dta
tab country
tab country, nol
keep if country == 1
gen year = 2013
keep survey uniqid country w1 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save FRAse80fall2013.dta, replace
*
use SE81spring2014.dta
tab country
tab country, nol
keep if country == 1
gen year = 2014
keep survey uniqid country w1 qa9_2 qa9_4 year
rename uniqid id
rename country country
rename w1 weight
rename qa9_2 trustgov
rename qa9_4 trusteu
save FRAse81spring2014.dta, replace
*
use SE82fall2014.dta
tab country
tab country, nol
keep if country == 1
gen year = 2014
keep survey uniqid country w1 qa8a_11 qa8a_13 year
rename uniqid id
rename w1 weight
rename qa8a_11 trustgov
rename qa8a_13 trusteu
save FRAse82fall2014.dta, replace
*
use SE83spring2015.dta
tab country
tab country, nol
keep if country == 1
gen year = 2015
keep survey uniqid country w1 qa8a_6 qa8a_8 year
rename uniqid id
rename w1 weight
rename qa8a_6 trustgov
rename qa8a_8 trusteu
save FRAse83spring2015.dta, replace
*
use SE84fall2015.dta
tab country
tab country, nol
keep if country == 1
gen year = 2015
keep survey uniqid country w1 qa8a_8 qa8a_10 year
rename uniqid id
rename w1 weight
rename qa8a_8 trustgov
rename qa8a_10 trusteu
save FRAse84fall2015.dta, replace
*
use SE85spring2016.dta
tab country
tab country, nol
keep if country == 1
gen year = 2016
keep survey uniqid country w1 qa8a_7 qa8a_9 year
rename uniqid id
rename w1 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save FRAse85spring2016.dta, replace
*
use SE86fall2016.dta
tab country
tab country, nolab
keep if country == 1
gen year = 2016
keep survey uniqid country w1 qa8a_12 qa8a_14 year
rename uniqid id
rename w1 weight
rename qa8a_12 trustgov
rename qa8a_14 trusteu
save FRAse86fall2016.dta, replace
*
use SE87spring2017.dta
tab country
tab country, nolab
keep if country == 1
gen year = 2017
keep survey uniqid country w1 qa8a_7 qa8a_9 year
rename uniqid id
rename w1 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save FRAse87spring2017.dta, replace
*
*
* Appending France (combining to one dataset)
use FRAse59spring2003.dta, clear
append using FRAse60fall2003.dta, nolab
save FRAappended.dta, replace
append using FRAse61spring2004.dta, nolab
save FRAappended.dta, replace
append using FRAse62fall2004.dta, nolab
save FRAappended.dta, replace
append using FRAse63spring2005.dta, nolab
save FRAappended.dta, replace
append using FRAse64fall2005.dta, nolab
save FRAappended.dta, replace
append using FRAse65spring2006.dta, nolab
save FRAappended.dta, replace
append using FRAse66fall2006.dta, nolab
save FRAappended.dta, replace
append using FRAse67spring2007.dta, nolab
save FRAappended.dta, replace
append using FRAse68fall2007.dta, nolab
save FRAappended.dta, replace
append using FRAse69spring2008.dta, nolab
save FRAappended.dta, replace
append using FRAse70fall2008.dta, nolab
save FRAappended.dta, replace
append using FRAse71spring2009.dta, nolab
save FRAappended.dta, replace
append using FRAse72fall2009.dta, nolab
save FRAappended.dta, replace
append using FRAse73spring2010.dta, nolab
save FRAappended.dta, replace
append using FRAse74fall2010.dta, nolab
save FRAappended.dta, replace
append using FRAse75spring2011.dta, nolab
save FRAappended.dta, replace
append using FRAse76fall2011.dta, nolab
save FRAappended.dta, replace
append using FRAse77spring2012.dta, nolab
save FRAappended.dta, replace
append using FRAse78fall2012.dta, nolab
save FRAappended.dta, replace
append using FRAse79spring2013.dta, nolab
save FRAappended.dta, replace
append using FRAse80fall2013.dta, nolab
save FRAappended.dta, replace
append using FRAse81spring2014.dta, nolab
save FRAappended.dta, replace
append using FRAse82fall2014.dta, nolab
save FRAappended.dta, replace
append using FRAse83spring2015.dta, nolab
save FRAappended.dta, replace
append using FRAse84fall2015.dta, nolab
save FRAappended.dta, replace
append using FRAse85spring2016.dta, nolab
save FRAappended.dta, replace
append using FRAse86fall2016.dta, nolab
save FRAappended.dta, replace
append using FRAse87spring2017.dta, nolab
save FRAappended.dta, replace
*
*
generate fradummytrusteu = 0  if trusteu == 2 // Tend not to trust
replace fradummytrusteu = 1 if trusteu == 1 //Tend to trust EU
generate fradummytrustgov = 0  if trustgov == 2 // Tend not to trust
replace fradummytrustgov = 1 if trustgov == 1 //Tend to trust government
*
collapse (mean) fradummytrusteu fradummytrustgov [pweight=weight], by(year) //weight on (united) country level
save FRAcollapsed.dta, replace
//graph twoway (line gerdummytrusteu year)
*
*


*
** POLAND
*
*
use SE63spring2005.dta, clear
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2005
replace v4 = 634 //EB no
keep v4 v5 v6 v8 v79 v81 year
tab v79, mi
tab v79, mi nolab
replace v79 = 3 if v79 == .d //Don't know
tab v81, mi
tab v81, mi nolab
replace v81 = 3 if v81 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v79 trustgov
rename v81 trusteu
save POLse63spring2005.dta, replace
*
use SE64fall2005.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2005
replace v4 = 642
keep v4 v5 v6 v8 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v93 trustgov
rename v95 trusteu
save POLse64fall2005.dta, replace
*
use SE65spring2006.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2006
replace v4 = 652
keep v4 v5 v6 v8 v89 v91 year
tab v91, mi
tab v91, mi nolab
replace v91 = 3 if v91 == .d //Don't know (for some reason already coded "3" for national government)
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v89 trustgov
rename v91 trusteu
save POLse65spring2006.dta, replace
*
use SE66fall2006.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2006
keep v4 v5 v6 v8 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v93 trustgov
rename v95 trusteu
save POLse66fall2006.dta, replace
*
use SE67spring2007.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2007
keep v4 v5 v6 v8 v162 v164 year
tab v162, mi
tab v162, mi nolab
replace v162 = 3 if v162 == .d //Don't know
tab v164, mi
tab v164, mi nolab
replace v164 = 3 if v164 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v162 trustgov
rename v164 trusteu
save POLse67spring2007.dta, replace
*
use SE68fall2007.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2007
keep v4 v5 v6 v8 v150 v152 year
tab v150, mi
tab v150, mi nolab
replace v150 = 3 if v150 == .d //Don't know
tab v152, mi
tab v152, mi nolab
replace v152 = 3 if v152 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v150 trustgov
rename v152 trusteu
save POLse68fall2007.dta, replace
*
use SE69spring2008.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2008
keep v4 v5 v6 v8 v213 v215 year
tab v213, mi
tab v213, mi nolab
replace v213 = 3 if v213 == .d //Don't know
tab v215, mi
tab v215, mi nolab
replace v215 = 3 if v215 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v213 trustgov
rename v215 trusteu
save POLse69spring2008.dta, replace
*
use SE70fall2008.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2008
keep v4 v5 v6 v8 v228 v230 year
tab v228, mi
tab v228, mi nolab
replace v228 = 3 if v228 == .d //Don't know
tab v230, mi
tab v230, mi nolab
replace v230 = 3 if v230 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v228 trustgov
rename v230 trusteu
save POLse70fall2008.dta, replace
*
use SE71spring2009.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2009
keep v4 v5 v6 v8 v217 v219 year
tab v217, mi
tab v217, mi nolab
replace v217 = 3 if v217 == .d //Don't know
tab v219, mi
tab v219, mi nolab
replace v219 = 3 if v219 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v217 trustgov
rename v219 trusteu
save POLse71spring2009.dta, replace
*
use SE72fall2009.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2009
keep v4 v5 v6 v8 v214 v216 year
tab v214, mi
tab v214, mi nolab
replace v214 = 3 if v214 == .d //Don't know
tab v216, mi
tab v216, mi nolab
replace v216 = 3 if v216 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v214 trustgov
rename v216 trusteu
save POLse72fall2009.dta, replace
*
use SE73spring2010.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2010
keep v4 v5 v6 v8 v271 v273 year
tab v271, mi
tab v271, mi nolab
replace v271 = 3 if v271 == .d //Don't know
tab v273, mi
tab v273, mi nolab
replace v273 = 3 if v273 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v271 trustgov
rename v273 trusteu
save POLse73spring2010.dta, replace
*
use SE74fall2010.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2010
keep v4 v5 v6 v8 v300 v302 year
tab v300, mi
tab v300, mi nolab
replace v300 = 3 if v300 == .d //Don't know
tab v302, mi
tab v302, mi nolab
replace v302 = 3 if v302 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v300 trustgov
rename v302 trusteu
save POLse74fall2010.dta, replace
*
use SE75spring2011.dta
tab v6
tab v6, nolab
keep if v6 == 26
gen year = 2011
keep v4 v5 v6 v8 v310 v312 year
tab v310, mi
tab v310, mi nolab
replace v310 = 3 if v310 == .d //Don't know
tab v312, mi
tab v312, mi nolab
replace v312 = 3 if v312 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v310 trustgov
rename v312 trusteu
save POLse75spring2011.dta, replace
*
use SE76fall2011.dta
tab country
tab country, nol
keep if country == 26
gen year = 2011
keep survey uniqid country w1 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save POLse76fall2011.dta, replace
*
use SE77spring2012.dta
tab country
tab country, nol
keep if country == 26
gen year = 2012
keep survey uniqid country w1 qa13_2 qa13_4 year
tab qa13_2, mi
tab qa13_2, mi nolab
replace qa13_2 = 3 if qa13_2 == .d //Don't know
tab qa13_4, mi
tab qa13_4, mi nolab
replace qa13_4 = 3 if qa13_4 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa13_2 trustgov
rename qa13_4 trusteu
save POLse77spring2012.dta, replace
*
use SE78fall2012.dta
tab country
tab country, nol
keep if country == 26
gen year = 2012
keep survey uniqid country w1 qa11_6 qa11_8 year
tab qa11_6, mi
tab qa11_6, mi nolab
replace qa11_6 = 3 if qa11_6 == .d //Don't know
tab qa11_8, mi
tab qa11_8, mi nolab
replace qa11_8 = 3 if qa11_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa11_6 trustgov
rename qa11_8 trusteu
save POLse78fall2012.dta, replace
*
use SE79spring2013.dta
tab country
tab country, nol
keep if country == 26
gen year = 2013
keep survey uniqid country w1 qa12_2 qa12_4 year
tab qa12_2, mi
tab qa12_2, mi nolab
replace qa12_2 = 3 if qa12_2 == .d //Don't know
tab qa12_4, mi
tab qa12_4, mi nolab
replace qa12_4 = 3 if qa12_4 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa12_2 trustgov
rename qa12_4 trusteu
save POLse79spring2013.dta, replace
*
use SE80fall2013.dta
tab country
tab country, nol
keep if country == 26
gen year = 2013
keep survey uniqid country w1 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save POLse80fall2013.dta, replace
*
use SE81spring2014.dta
tab country
tab country, nol
keep if country == 26
gen year = 2014
keep survey uniqid country w1 qa9_2 qa9_4 year
rename uniqid id
rename country country
rename w1 weight
rename qa9_2 trustgov
rename qa9_4 trusteu
save POLse81spring2014.dta, replace
*
use SE82fall2014.dta
tab country
tab country, nol
keep if country == 26
gen year = 2014
keep survey uniqid country w1 qa8a_11 qa8a_13 year
rename uniqid id
rename w1 weight
rename qa8a_11 trustgov
rename qa8a_13 trusteu
save POLse82fall2014.dta, replace
*
use SE83spring2015.dta
tab country
tab country, nol
keep if country == 26
gen year = 2015
keep survey uniqid country w1 qa8a_6 qa8a_8 year
rename uniqid id
rename w1 weight
rename qa8a_6 trustgov
rename qa8a_8 trusteu
save POLse83spring2015.dta, replace
*
use SE84fall2015.dta
tab country
tab country, nol
keep if country == 26
gen year = 2015
keep survey uniqid country w1 qa8a_8 qa8a_10 year
rename uniqid id
rename w1 weight
rename qa8a_8 trustgov
rename qa8a_10 trusteu
save POLse84fall2015.dta, replace
*
use SE85spring2016.dta
tab country
tab country, nol
keep if country == 26
gen year = 2016
keep survey uniqid country w1 qa8a_7 qa8a_9 year
rename uniqid id
rename w1 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save POLse85spring2016.dta, replace
*
use SE86fall2016.dta
tab country
tab country, nolab
keep if country == 26
gen year = 2016
keep survey uniqid country w1 qa8a_12 qa8a_14 year
rename uniqid id
rename w1 weight
rename qa8a_12 trustgov
rename qa8a_14 trusteu
save POLse86fall2016.dta, replace
*
use SE87spring2017.dta
tab country
tab country, nolab
keep if country == 26
gen year = 2017
keep survey uniqid country w1 qa8a_7 qa8a_9 year
rename uniqid id
rename w1 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save POLse87spring2017.dta, replace
*
*
* Appending Poland (combining to one dataset)
use POLse63spring2005.dta, clear
append using POLse64fall2005.dta, nolab
save POLappended.dta, replace
append using POLse65spring2006.dta, nolab
save POLappended.dta, replace
append using POLse66fall2006.dta, nolab
save POLappended.dta, replace
append using POLse67spring2007.dta, nolab
save POLappended.dta, replace
append using POLse68fall2007.dta, nolab
save POLappended.dta, replace
append using POLse69spring2008.dta, nolab
save POLappended.dta, replace
append using POLse70fall2008.dta, nolab
save POLappended.dta, replace
append using POLse71spring2009.dta, nolab
save POLappended.dta, replace
append using POLse72fall2009.dta, nolab
save POLappended.dta, replace
append using POLse73spring2010.dta, nolab
save POLappended.dta, replace
append using POLse74fall2010.dta, nolab
save POLappended.dta, replace
append using POLse75spring2011.dta, nolab
save POLappended.dta, replace
append using POLse76fall2011.dta, nolab
save POLappended.dta, replace
append using POLse77spring2012.dta, nolab
save POLappended.dta, replace
append using POLse78fall2012.dta, nolab
save POLappended.dta, replace
append using POLse79spring2013.dta, nolab
save POLappended.dta, replace
append using POLse80fall2013.dta, nolab
save POLappended.dta, replace
append using POLse81spring2014.dta, nolab
save POLappended.dta, replace
append using POLse82fall2014.dta, nolab
save POLappended.dta, replace
append using POLse83spring2015.dta, nolab
save POLappended.dta, replace
append using POLse84fall2015.dta, nolab
save POLappended.dta, replace
append using POLse85spring2016.dta, nolab
save POLappended.dta, replace
append using POLse86fall2016.dta, nolab
save POLappended.dta, replace
append using POLse87spring2017.dta, nolab
save POLappended.dta, replace
*
*
generate POLdummytrusteu = 0 if trusteu == 2 // Tend not to trust
replace POLdummytrusteu = 1 if trusteu == 1 //Tend to trust EU
generate POLdummytrustgov = 0 if trustgov == 2 // Tend not to trust
replace POLdummytrustgov = 1 if trustgov == 1 //Tend to trust government
*
collapse (mean) POLdummytrusteu POLdummytrustgov [pweight=weight], by(year) //weight on (united) country level
save POLcollapsed.dta, replace
//graph twoway (line gerdummytrusteu year)
*
*

** Italy
*
*
*
use SE63spring2005.dta, clear
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2005
replace v4 = 634 //EB no
keep v4 v5 v6 v8 v79 v81 year
tab v79, mi
tab v79, mi nolab
replace v79 = 3 if v79 == .d //Don't know
tab v81, mi
tab v81, mi nolab
replace v81 = 3 if v81 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v79 trustgov
rename v81 trusteu
save ITAse63spring2005.dta, replace
*
use SE64fall2005.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2005
replace v4 = 642
keep v4 v5 v6 v8 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v93 trustgov
rename v95 trusteu
save ITAse64fall2005.dta, replace
*
use SE65spring2006.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2006
replace v4 = 652
keep v4 v5 v6 v8 v89 v91 year
tab v91, mi
tab v91, mi nolab
replace v91 = 3 if v91 == .d //Don't know (for some reason already coded "3" for national government)
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v89 trustgov
rename v91 trusteu
save ITAse65spring2006.dta, replace
*
use SE66fall2006.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2006
keep v4 v5 v6 v8 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v93 trustgov
rename v95 trusteu
save ITAse66fall2006.dta, replace
*
use SE67spring2007.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2007
keep v4 v5 v6 v8 v162 v164 year
tab v162, mi
tab v162, mi nolab
replace v162 = 3 if v162 == .d //Don't know
tab v164, mi
tab v164, mi nolab
replace v164 = 3 if v164 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v162 trustgov
rename v164 trusteu
save ITAse67spring2007.dta, replace
*
use SE68fall2007.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2007
keep v4 v5 v6 v8 v150 v152 year
tab v150, mi
tab v150, mi nolab
replace v150 = 3 if v150 == .d //Don't know
tab v152, mi
tab v152, mi nolab
replace v152 = 3 if v152 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v150 trustgov
rename v152 trusteu
save ITAse68fall2007.dta, replace
*
use SE69spring2008.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2008
keep v4 v5 v6 v8 v213 v215 year
tab v213, mi
tab v213, mi nolab
replace v213 = 3 if v213 == .d //Don't know
tab v215, mi
tab v215, mi nolab
replace v215 = 3 if v215 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v213 trustgov
rename v215 trusteu
save ITAse69spring2008.dta, replace
*
use SE70fall2008.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2008
keep v4 v5 v6 v8 v228 v230 year
tab v228, mi
tab v228, mi nolab
replace v228 = 3 if v228 == .d //Don't know
tab v230, mi
tab v230, mi nolab
replace v230 = 3 if v230 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v228 trustgov
rename v230 trusteu
save ITAse70fall2008.dta, replace
*
use SE71spring2009.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2009
keep v4 v5 v6 v8 v217 v219 year
tab v217, mi
tab v217, mi nolab
replace v217 = 3 if v217 == .d //Don't know
tab v219, mi
tab v219, mi nolab
replace v219 = 3 if v219 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v217 trustgov
rename v219 trusteu
save ITAse71spring2009.dta, replace
*
use SE72fall2009.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2009
keep v4 v5 v6 v8 v214 v216 year
tab v214, mi
tab v214, mi nolab
replace v214 = 3 if v214 == .d //Don't know
tab v216, mi
tab v216, mi nolab
replace v216 = 3 if v216 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v214 trustgov
rename v216 trusteu
save ITAse72fall2009.dta, replace
*
use SE73spring2010.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2010
keep v4 v5 v6 v8 v271 v273 year
tab v271, mi
tab v271, mi nolab
replace v271 = 3 if v271 == .d //Don't know
tab v273, mi
tab v273, mi nolab
replace v273 = 3 if v273 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v271 trustgov
rename v273 trusteu
save ITAse73spring2010.dta, replace
*
use SE74fall2010.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2010
keep v4 v5 v6 v8 v300 v302 year
tab v300, mi
tab v300, mi nolab
replace v300 = 3 if v300 == .d //Don't know
tab v302, mi
tab v302, mi nolab
replace v302 = 3 if v302 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v300 trustgov
rename v302 trusteu
save ITAse74fall2010.dta, replace
*
use SE75spring2011.dta
tab v6
tab v6, nolab
keep if v6 == 5
gen year = 2011
keep v4 v5 v6 v8 v310 v312 year
tab v310, mi
tab v310, mi nolab
replace v310 = 3 if v310 == .d //Don't know
tab v312, mi
tab v312, mi nolab
replace v312 = 3 if v312 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v310 trustgov
rename v312 trusteu
save ITAse75spring2011.dta, replace
*
use SE76fall2011.dta
tab country
tab country, nol
keep if country == 5
gen year = 2011
keep survey uniqid country w1 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save ITAse76fall2011.dta, replace
*
use SE77spring2012.dta
tab country
tab country, nol
keep if country == 5
gen year = 2012
keep survey uniqid country w1 qa13_2 qa13_4 year
tab qa13_2, mi
tab qa13_2, mi nolab
replace qa13_2 = 3 if qa13_2 == .d //Don't know
tab qa13_4, mi
tab qa13_4, mi nolab
replace qa13_4 = 3 if qa13_4 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa13_2 trustgov
rename qa13_4 trusteu
save ITAse77spring2012.dta, replace
*
use SE78fall2012.dta
tab country
tab country, nol
keep if country == 5
gen year = 2012
keep survey uniqid country w1 qa11_6 qa11_8 year
tab qa11_6, mi
tab qa11_6, mi nolab
replace qa11_6 = 3 if qa11_6 == .d //Don't know
tab qa11_8, mi
tab qa11_8, mi nolab
replace qa11_8 = 3 if qa11_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa11_6 trustgov
rename qa11_8 trusteu
save ITAse78fall2012.dta, replace
*
use SE79spring2013.dta
tab country
tab country, nol
keep if country == 5
gen year = 2013
keep survey uniqid country w1 qa12_2 qa12_4 year
tab qa12_2, mi
tab qa12_2, mi nolab
replace qa12_2 = 3 if qa12_2 == .d //Don't know
tab qa12_4, mi
tab qa12_4, mi nolab
replace qa12_4 = 3 if qa12_4 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa12_2 trustgov
rename qa12_4 trusteu
save ITAse79spring2013.dta, replace
*
use SE80fall2013.dta
tab country
tab country, nol
keep if country == 5
gen year = 2013
keep survey uniqid country w1 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save ITAse80fall2013.dta, replace
*
use SE81spring2014.dta
tab country
tab country, nol
keep if country == 5
gen year = 2014
keep survey uniqid country w1 qa9_2 qa9_4 year
rename uniqid id
rename country country
rename w1 weight
rename qa9_2 trustgov
rename qa9_4 trusteu
save ITAse81spring2014.dta, replace
*
use SE82fall2014.dta
tab country
tab country, nol
keep if country == 5
gen year = 2014
keep survey uniqid country w1 qa8a_11 qa8a_13 year
rename uniqid id
rename w1 weight
rename qa8a_11 trustgov
rename qa8a_13 trusteu
save ITAse82fall2014.dta, replace
*
use SE83spring2015.dta
tab country
tab country, nol
keep if country == 5
gen year = 2015
keep survey uniqid country w1 qa8a_6 qa8a_8 year
rename uniqid id
rename w1 weight
rename qa8a_6 trustgov
rename qa8a_8 trusteu
save ITAse83spring2015.dta, replace
*
use SE84fall2015.dta
tab country
tab country, nol
keep if country == 5
gen year = 2015
keep survey uniqid country w1 qa8a_8 qa8a_10 year
rename uniqid id
rename w1 weight
rename qa8a_8 trustgov
rename qa8a_10 trusteu
save ITAse84fall2015.dta, replace
*
use SE85spring2016.dta
tab country
tab country, nol
keep if country == 5
gen year = 2016
keep survey uniqid country w1 qa8a_7 qa8a_9 year
rename uniqid id
rename w1 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save ITAse85spring2016.dta, replace
*
use SE86fall2016.dta
tab country
tab country, nolab
keep if country == 5
gen year = 2016
keep survey uniqid country w1 qa8a_12 qa8a_14 year
rename uniqid id
rename w1 weight
rename qa8a_12 trustgov
rename qa8a_14 trusteu
save ITAse86fall2016.dta, replace
*
use SE87spring2017.dta
tab country
tab country, nolab
keep if country == 5
gen year = 2017
keep survey uniqid country w1 qa8a_7 qa8a_9 year
rename uniqid id
rename w1 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save ITAse87spring2017.dta, replace
*
*
* Appending Italy (combining to one dataset)
use ITAse63spring2005.dta, clear
append using ITAse64fall2005.dta, nolab
save ITAappended.dta, replace
append using ITAse65spring2006.dta, nolab
save ITAappended.dta, replace
append using ITAse66fall2006.dta, nolab
save ITAappended.dta, replace
append using ITAse67spring2007.dta, nolab
save ITAappended.dta, replace
append using ITAse68fall2007.dta, nolab
save ITAappended.dta, replace
append using ITAse69spring2008.dta, nolab
save ITAappended.dta, replace
append using ITAse70fall2008.dta, nolab
save ITAappended.dta, replace
append using ITAse71spring2009.dta, nolab
save ITAappended.dta, replace
append using ITAse72fall2009.dta, nolab
save ITAappended.dta, replace
append using ITAse73spring2010.dta, nolab
save ITAappended.dta, replace
append using ITAse74fall2010.dta, nolab
save ITAappended.dta, replace
append using ITAse75spring2011.dta, nolab
save ITAappended.dta, replace
append using ITAse76fall2011.dta, nolab
save ITAappended.dta, replace
append using ITAse77spring2012.dta, nolab
save ITAappended.dta, replace
append using ITAse78fall2012.dta, nolab
save ITAappended.dta, replace
append using ITAse79spring2013.dta, nolab
save ITAappended.dta, replace
append using ITAse80fall2013.dta, nolab
save ITAappended.dta, replace
append using ITAse81spring2014.dta, nolab
save ITAappended.dta, replace
append using ITAse82fall2014.dta, nolab
save ITAappended.dta, replace
append using ITAse83spring2015.dta, nolab
save ITAappended.dta, replace
append using ITAse84fall2015.dta, nolab
save ITAappended.dta, replace
append using ITAse85spring2016.dta, nolab
save ITAappended.dta, replace
append using ITAse86fall2016.dta, nolab
save ITAappended.dta, replace
append using ITAse87spring2017.dta, nolab
save ITAappended.dta, replace
*
*
generate ITAdummytrusteu = 0 if trusteu == 2 // Tend not to trust
replace ITAdummytrusteu = 1 if trusteu == 1 //Tend to trust EU
generate ITAdummytrustgov = 0 if trustgov == 2 // Tend not to trust
replace ITAdummytrustgov = 1 if trustgov == 1 //Tend to trust government
*
collapse (mean) ITAdummytrusteu ITAdummytrustgov [pweight=weight], by(year) //weight on (united) country level
save ITAcollapsed.dta, replace
//graph twoway (line gerdummytrusteu year)
*
*

*
*
*DENMARK
*
use SE63spring2005.dta, clear
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2005
replace v4 = 634 //EB no
keep v4 v5 v6 v8 v79 v81 year
tab v79, mi
tab v79, mi nolab
replace v79 = 3 if v79 == .d //Don't know
tab v81, mi
tab v81, mi nolab
replace v81 = 3 if v81 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v79 trustgov
rename v81 trusteu
save DENse63spring2005.dta, replace
*
use SE64fall2005.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2005
replace v4 = 642
keep v4 v5 v6 v8 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v93 trustgov
rename v95 trusteu
save DENse64fall2005.dta, replace
*
use SE65spring2006.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2006
replace v4 = 652
keep v4 v5 v6 v8 v89 v91 year
tab v91, mi
tab v91, mi nolab
replace v91 = 3 if v91 == .d //Don't know (for some reason already coded "3" for national government)
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v89 trustgov
rename v91 trusteu
save DENse65spring2006.dta, replace
*
use SE66fall2006.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2006
keep v4 v5 v6 v8 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v93 trustgov
rename v95 trusteu
save DENse66fall2006.dta, replace
*
use SE67spring2007.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2007
keep v4 v5 v6 v8 v162 v164 year
tab v162, mi
tab v162, mi nolab
replace v162 = 3 if v162 == .d //Don't know
tab v164, mi
tab v164, mi nolab
replace v164 = 3 if v164 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v162 trustgov
rename v164 trusteu
save DENse67spring2007.dta, replace
*
use SE68fall2007.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2007
keep v4 v5 v6 v8 v150 v152 year
tab v150, mi
tab v150, mi nolab
replace v150 = 3 if v150 == .d //Don't know
tab v152, mi
tab v152, mi nolab
replace v152 = 3 if v152 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v150 trustgov
rename v152 trusteu
save DENse68fall2007.dta, replace
*
use SE69spring2008.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2008
keep v4 v5 v6 v8 v213 v215 year
tab v213, mi
tab v213, mi nolab
replace v213 = 3 if v213 == .d //Don't know
tab v215, mi
tab v215, mi nolab
replace v215 = 3 if v215 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v213 trustgov
rename v215 trusteu
save DENse69spring2008.dta, replace
*
use SE70fall2008.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2008
keep v4 v5 v6 v8 v228 v230 year
tab v228, mi
tab v228, mi nolab
replace v228 = 3 if v228 == .d //Don't know
tab v230, mi
tab v230, mi nolab
replace v230 = 3 if v230 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v228 trustgov
rename v230 trusteu
save DENse70fall2008.dta, replace
*
use SE71spring2009.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2009
keep v4 v5 v6 v8 v217 v219 year
tab v217, mi
tab v217, mi nolab
replace v217 = 3 if v217 == .d //Don't know
tab v219, mi
tab v219, mi nolab
replace v219 = 3 if v219 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v217 trustgov
rename v219 trusteu
save DENse71spring2009.dta, replace
*
use SE72fall2009.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2009
keep v4 v5 v6 v8 v214 v216 year
tab v214, mi
tab v214, mi nolab
replace v214 = 3 if v214 == .d //Don't know
tab v216, mi
tab v216, mi nolab
replace v216 = 3 if v216 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v214 trustgov
rename v216 trusteu
save DENse72fall2009.dta, replace
*
use SE73spring2010.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2010
keep v4 v5 v6 v8 v271 v273 year
tab v271, mi
tab v271, mi nolab
replace v271 = 3 if v271 == .d //Don't know
tab v273, mi
tab v273, mi nolab
replace v273 = 3 if v273 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v271 trustgov
rename v273 trusteu
save DENse73spring2010.dta, replace
*
use SE74fall2010.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2010
keep v4 v5 v6 v8 v300 v302 year
tab v300, mi
tab v300, mi nolab
replace v300 = 3 if v300 == .d //Don't know
tab v302, mi
tab v302, mi nolab
replace v302 = 3 if v302 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v300 trustgov
rename v302 trusteu
save DENse74fall2010.dta, replace
*
use SE75spring2011.dta
tab v6
tab v6, nolab
keep if v6 == 7
gen year = 2011
keep v4 v5 v6 v8 v310 v312 year
tab v310, mi
tab v310, mi nolab
replace v310 = 3 if v310 == .d //Don't know
tab v312, mi
tab v312, mi nolab
replace v312 = 3 if v312 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v8 weight
rename v310 trustgov
rename v312 trusteu
save DENse75spring2011.dta, replace
*
use SE76fall2011.dta
tab country
tab country, nol
keep if country == 7
gen year = 2011
keep survey uniqid country w1 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save DENse76fall2011.dta, replace
*
use SE77spring2012.dta
tab country
tab country, nol
keep if country == 7
gen year = 2012
keep survey uniqid country w1 qa13_2 qa13_4 year
tab qa13_2, mi
tab qa13_2, mi nolab
replace qa13_2 = 3 if qa13_2 == .d //Don't know
tab qa13_4, mi
tab qa13_4, mi nolab
replace qa13_4 = 3 if qa13_4 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa13_2 trustgov
rename qa13_4 trusteu
save DENse77spring2012.dta, replace
*
use SE78fall2012.dta
tab country
tab country, nol
keep if country == 7
gen year = 2012
keep survey uniqid country w1 qa11_6 qa11_8 year
tab qa11_6, mi
tab qa11_6, mi nolab
replace qa11_6 = 3 if qa11_6 == .d //Don't know
tab qa11_8, mi
tab qa11_8, mi nolab
replace qa11_8 = 3 if qa11_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa11_6 trustgov
rename qa11_8 trusteu
save DENse78fall2012.dta, replace
*
use SE79spring2013.dta
tab country
tab country, nol
keep if country == 7
gen year = 2013
keep survey uniqid country w1 qa12_2 qa12_4 year
tab qa12_2, mi
tab qa12_2, mi nolab
replace qa12_2 = 3 if qa12_2 == .d //Don't know
tab qa12_4, mi
tab qa12_4, mi nolab
replace qa12_4 = 3 if qa12_4 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa12_2 trustgov
rename qa12_4 trusteu
save DENse79spring2013.dta, replace
*
use SE80fall2013.dta
tab country
tab country, nol
keep if country == 7
gen year = 2013
keep survey uniqid country w1 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename country country
rename w1 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save DENse80fall2013.dta, replace
*
use SE81spring2014.dta
tab country
tab country, nol
keep if country == 7
gen year = 2014
keep survey uniqid country w1 qa9_2 qa9_4 year
rename uniqid id
rename country country
rename w1 weight
rename qa9_2 trustgov
rename qa9_4 trusteu
save DENse81spring2014.dta, replace
*
use SE82fall2014.dta
tab country
tab country, nol
keep if country == 7
gen year = 2014
keep survey uniqid country w1 qa8a_11 qa8a_13 year
rename uniqid id
rename w1 weight
rename qa8a_11 trustgov
rename qa8a_13 trusteu
save DENse82fall2014.dta, replace
*
use SE83spring2015.dta
tab country
tab country, nol
keep if country == 7
gen year = 2015
keep survey uniqid country w1 qa8a_6 qa8a_8 year
rename uniqid id
rename w1 weight
rename qa8a_6 trustgov
rename qa8a_8 trusteu
save DENse83spring2015.dta, replace
*
use SE84fall2015.dta
tab country
tab country, nol
keep if country == 7
gen year = 2015
keep survey uniqid country w1 qa8a_8 qa8a_10 year
rename uniqid id
rename w1 weight
rename qa8a_8 trustgov
rename qa8a_10 trusteu
save DENse84fall2015.dta, replace
*
use SE85spring2016.dta
tab country
tab country, nol
keep if country == 7
gen year = 2016
keep survey uniqid country w1 qa8a_7 qa8a_9 year
rename uniqid id
rename w1 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save DENse85spring2016.dta, replace
*
use SE86fall2016.dta
tab country
tab country, nolab
keep if country == 7
gen year = 2016
keep survey uniqid country w1 qa8a_12 qa8a_14 year
rename uniqid id
rename w1 weight
rename qa8a_12 trustgov
rename qa8a_14 trusteu
save DENse86fall2016.dta, replace
*
use SE87spring2017.dta
tab country
tab country, nolab
keep if country == 7
gen year = 2017
keep survey uniqid country w1 qa8a_7 qa8a_9 year
rename uniqid id
rename w1 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save DENse87spring2017.dta, replace
*
*
* Appending Denmark (combining to one dataset)
use DENse63spring2005.dta, clear
append using DENse64fall2005.dta, nolab
save DENappended.dta, replace
append using DENse65spring2006.dta, nolab
save DENappended.dta, replace
append using DENse66fall2006.dta, nolab
save DENappended.dta, replace
append using DENse67spring2007.dta, nolab
save DENappended.dta, replace
append using DENse68fall2007.dta, nolab
save DENappended.dta, replace
append using DENse69spring2008.dta, nolab
save DENappended.dta, replace
append using DENse70fall2008.dta, nolab
save DENappended.dta, replace
append using DENse71spring2009.dta, nolab
save DENappended.dta, replace
append using DENse72fall2009.dta, nolab
save DENappended.dta, replace
append using DENse73spring2010.dta, nolab
save DENappended.dta, replace
append using DENse74fall2010.dta, nolab
save DENappended.dta, replace
append using DENse75spring2011.dta, nolab
save DENappended.dta, replace
append using DENse76fall2011.dta, nolab
save DENappended.dta, replace
append using DENse77spring2012.dta, nolab
save DENappended.dta, replace
append using DENse78fall2012.dta, nolab
save DENappended.dta, replace
append using DENse79spring2013.dta, nolab
save DENappended.dta, replace
append using DENse80fall2013.dta, nolab
save DENappended.dta, replace
append using DENse81spring2014.dta, nolab
save DENappended.dta, replace
append using DENse82fall2014.dta, nolab
save DENappended.dta, replace
append using DENse83spring2015.dta, nolab
save DENappended.dta, replace
append using DENse84fall2015.dta, nolab
save DENappended.dta, replace
append using DENse85spring2016.dta, nolab
save DENappended.dta, replace
append using DENse86fall2016.dta, nolab
save DENappended.dta, replace
append using DENse87spring2017.dta, nolab
save DENappended.dta, replace
*
*
generate DENdummytrusteu = 0 if trusteu == 2 // Tend not to trust
replace DENdummytrusteu = 1 if trusteu == 1 //Tend to trust EU
generate DENdummytrustgov = 0 if trustgov == 2 // Tend not to trust
replace DENdummytrustgov = 1 if trustgov == 1 //Tend to trust government
*
collapse (mean) DENdummytrusteu DENdummytrustgov [pweight=weight], by(year) //weight on (united) country level
save DENcollapsed.dta, replace
//graph twow
*
**
** EU-level (all countries) (weights on EU level, corresponding to the number of Member states at time of survey)
**
*
* EU (as a whole)
*
use SE59spring2003.dta
gen year = 2003
tab v27
tab v27, nolab
keep if v27 == 1 //Only member states (EU 15)
keep v4 v5 v6 v28 v62 v64 year
replace v4 = 591 //Survey
tab v62, mi
tab v62, mi nolab
replace v62 = 3 if v62 == .d //Don't know
tab v64, mi
tab v64, mi nolab
replace v64 = 3 if v64 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v28 weight
rename v62 trustgov
rename v64 trusteu
save EUse59spring2003.dta, replace
*
use SE60fall2003.dta
gen year = 2003
keep v4 v5 v6 v19 v54 v56 year
replace v4 = 601 //EB no
tab v54, mi
tab v54, mi nolab
replace v54 = 3 if v54 == .d //Don't know
tab v56, mi
tab v56, mi nolab
replace v56 = 3 if v56 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v19 weight
rename v54 trustgov
rename v56 trusteu
save EUse60fall2003.dta, replace
*
use SE61spring2004.dta
gen year = 2004
keep v4 v5 v6 v19 v55 v57 year
replace v4 = 610 //EB no
tab v55, mi
tab v55, mi nolab
replace v55 = 3 if v55 == .d //Don't know
tab v57, mi
tab v57, mi nolab
replace v57 = 3 if v57 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country //Still EU15 (before May 2004)
rename v19 weight
rename v55 trustgov
rename v57 trusteu
save EUse61spring2004.dta, replace
*
use SE62fall2004.dta
tab v31
tab v31, nol
keep if v31 == 1 //EU25 only
gen year = 2004
keep v4 v5 v6 v31 v32 v93 v95 year
replace v4 = 620 //EB no
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v31 eums
rename v32 weight
rename v93 trustgov
rename v95 trusteu
save EUse62fall2004.dta, replace
*
use SE63spring2005.dta
tab v31
tab v31, nolab
keep if v31 == 1
gen year = 2005
replace v4 = 634 //EB no
keep v4 v5 v6 v31 v32 v79 v81 year
tab v79, mi
tab v79, mi nolab
replace v79 = 3 if v79 == .d //Don't know
tab v81, mi
tab v81, mi nolab
replace v81 = 3 if v81 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v31 eums
rename v32 weight
rename v79 trustgov
rename v81 trusteu
save EUse63spring2005.dta, replace
*
use SE64fall2005.dta
tab v31
tab v31, nolab
keep if v31 == 1 //EU25 states
gen year = 2005
replace v4 = 642
keep v4 v5 v6 v31 v32 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v31 eums
rename v32 weight
rename v93 trustgov
rename v95 trusteu
save EUse64fall2005.dta, replace
*
use SE65spring2006.dta
tab v31
tab v31, nolab
keep if v31 == 1 //EU25
gen year = 2006
replace v4 = 652
keep v4 v5 v6 v31 v32 v89 v91 year
tab v91, mi
tab v91, mi nolab
replace v91 = 3 if v91 == .d //Don't know (for some reason already coded "3" for national government)
rename v4 survey
rename v5 id
rename v6 country
rename v31 eums
rename v32 weight
rename v89 trustgov
rename v91 trusteu
save EUse65spring2006.dta, replace
*
use SE66fall2006.dta
tab v31
tab v31, nolab
keep if v31 == 1 //EU25
gen year = 2006
keep v4 v5 v6 v31 v32 v93 v95 year
tab v93, mi
tab v93, mi nolab
replace v93 = 3 if v93 == .d //Don't know
tab v95, mi
tab v95, mi nolab
replace v95 = 3 if v95 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v31 eums
rename v32 weight
rename v93 trustgov
rename v95 trusteu
save EUse66fall2006.dta, replace
*
use SE67spring2007.dta //EU27!
tab v41
tab v41, nolab
keep if v41 == 1 //EU27
gen year = 2007
keep v4 v5 v6 v41 v42 v162 v164 year
tab v162, mi
tab v162, mi nolab
replace v162 = 3 if v162 == .d //Don't know
tab v164, mi
tab v164, mi nolab
replace v164 = 3 if v164 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v41 eums
rename v42 weight
rename v162 trustgov
rename v164 trusteu
save EUse67spring2007.dta, replace
*
use SE68fall2007.dta
tab v41
tab v41, nolab
keep if v41 == 1 //EU27
gen year = 2007
keep v4 v5 v6 v41 v42 v150 v152 year
tab v150, mi
tab v150, mi nolab
replace v150 = 3 if v150 == .d //Don't know
tab v152, mi
tab v152, mi nolab
replace v152 = 3 if v152 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v41 eums
rename v42 weight
rename v150 trustgov
rename v152 trusteu
save EUse68fall2007.dta, replace
*
use SE69spring2008.dta
tab v39
tab v39, nolab
keep if v39 == 1 //EU27
gen year = 2008
keep v4 v5 v6 v39 v40 v213 v215 year
tab v213, mi
tab v213, mi nolab
replace v213 = 3 if v213 == .d //Don't know
tab v215, mi
tab v215, mi nolab
replace v215 = 3 if v215 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v39 eums
rename v40 weight
rename v213 trustgov
rename v215 trusteu
save EUse69spring2008.dta, replace
*
use SE70fall2008.dta
tab v39
tab v39, nolab
keep if v39 == 1
gen year = 2008
keep v4 v5 v6 v39 v40 v228 v230 year
tab v228, mi
tab v228, mi nolab
replace v228 = 3 if v228 == .d //Don't know
tab v230, mi
tab v230, mi nolab
replace v230 = 3 if v230 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v39 eums
rename v40 weight
rename v228 trustgov
rename v230 trusteu
save EUse70fall2008.dta, replace
*
use SE71spring2009.dta
tab v37
tab v37, nolab
keep if v37 == 1
gen year = 2009
keep v4 v5 v6 v37 v38 v217 v219 year
tab v217, mi
tab v217, mi nolab
replace v217 = 3 if v217 == .d //Don't know
tab v219, mi
tab v219, mi nolab
replace v219 = 3 if v219 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v37 eums
rename v38 weight
rename v217 trustgov
rename v219 trusteu
save EUse71spring2009.dta, replace
*
use SE72fall2009.dta
tab v37
tab v37, nolab
keep if v37 == 1
gen year = 2009
keep v4 v5 v6 v37 v38 v214 v216 year
tab v214, mi
tab v214, mi nolab
replace v214 = 3 if v214 == .d //Don't know
tab v216, mi
tab v216, mi nolab
replace v216 = 3 if v216 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v37 eums
rename v38 weight
rename v214 trustgov
rename v216 trusteu
save EUse72fall2009.dta, replace
*
use SE73spring2010.dta
tab v39
tab v39, nolab
keep if v39 == 1 //EU27
gen year = 2010
keep v4 v5 v6 v39 v40 v271 v273 year
tab v271, mi
tab v271, mi nolab
replace v271 = 3 if v271 == .d //Don't know
tab v273, mi
tab v273, mi nolab
replace v273 = 3 if v273 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v39 eums
rename v40 weight
rename v271 trustgov
rename v273 trusteu
save EUse73spring2010.dta, replace
*
use SE74fall2010.dta
tab v37
tab v37, nolab
keep if v37 == 1
gen year = 2010
keep v4 v5 v6 v37 v38 v300 v302 year
tab v300, mi
tab v300, mi nolab
replace v300 = 3 if v300 == .d //Don't know
tab v302, mi
tab v302, mi nolab
replace v302 = 3 if v302 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v37 eums
rename v38 weight
rename v300 trustgov
rename v302 trusteu
save EUse74fall2010.dta, replace
*
use SE75spring2011.dta
tab v41
tab v41, nolab
keep if v41 == 1
gen year = 2011
keep v4 v5 v6 v41 v42 v310 v312 year
tab v310, mi
tab v310, mi nolab
replace v310 = 3 if v310 == .d //Don't know
tab v312, mi
tab v312, mi nolab
replace v312 = 3 if v312 == .d //Don't know
rename v4 survey
rename v5 id
rename v6 country
rename v41 eums
rename v42 weight
rename v310 trustgov
rename v312 trusteu
save EUse75spring2011.dta, replace
*
use SE76fall2011.dta
tab eu27
tab eu27, nol
keep if eu27 == 1
gen year = 2011
keep survey uniqid country eu27 w22 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename eu27 eums
rename w22 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save EUse76fall2011.dta, replace
*
use SE77spring2012.dta
tab eu27
tab eu27, nolab
keep if eu27 == 1
gen year = 2012
keep survey uniqid country eu27 w22 qa13_2 qa13_4 year
tab qa13_2, mi
tab qa13_2, mi nolab
replace qa13_2 = 3 if qa13_2 == .d //Don't know
tab qa13_4, mi
tab qa13_4, mi nolab
replace qa13_4 = 3 if qa13_4 == .d //Don't know
rename uniqid id
rename eu27 eums
rename w22 weight
rename qa13_2 trustgov
rename qa13_4 trusteu
save EUse77spring2012.dta, replace
*
use SE78fall2012.dta
tab eu27
tab eu27, nolab
keep if eu27 == 1
gen year = 2012
keep survey uniqid country eu27 w22 qa11_6 qa11_8 year
tab qa11_6, mi
tab qa11_6, mi nolab
replace qa11_6 = 3 if qa11_6 == .d //Don't know
tab qa11_8, mi
tab qa11_8, mi nolab
replace qa11_8 = 3 if qa11_8 == .d //Don't know
rename uniqid id
rename eu27 eums
rename w22 weight
rename qa11_6 trustgov
rename qa11_8 trusteu
save EUse78fall2012.dta, replace
*
use SE79spring2013.dta
tab eu27
tab eu27, nolab
keep if eu27 == 1
gen year = 2013
keep survey uniqid country eu27 w22 qa12_2 qa12_4 year
tab qa12_2, mi
tab qa12_2, mi nolab
replace qa12_2 = 3 if qa12_2 == .d //Don't know
tab qa12_4, mi
tab qa12_4, mi nolab
replace qa12_4 = 3 if qa12_4 == .d //Don't know
rename uniqid id
rename eu27 eums
rename w22 weight
rename qa12_2 trustgov
rename qa12_4 trusteu
save EUse79spring2013.dta, replace
*
use SE80fall2013.dta
tab eu28 //After enlargement July 2013
tab eu28, nolab
keep if eu28 == 1
gen year = 2013
keep survey uniqid country eu28 w23 qa10_6 qa10_8 year
tab qa10_6, mi
tab qa10_6, mi nolab
replace qa10_6 = 3 if qa10_6 == .d //Don't know
tab qa10_8, mi
tab qa10_8, mi nolab
replace qa10_8 = 3 if qa10_8 == .d //Don't know
rename uniqid id
rename eu28 eums
rename w23 weight
rename qa10_6 trustgov
rename qa10_8 trusteu
save EUse80fall2013.dta, replace
*
use SE81spring2014.dta
tab eu28
tab eu28, nolab
keep if eu28 == 1
gen year = 2014
keep survey uniqid country eu28 w23 qa9_2 qa9_4 year
rename uniqid id
rename eu28 eums
rename w23 weight
rename qa9_2 trustgov
rename qa9_4 trusteu
save EUse81spring2014.dta, replace
*
use SE82fall2014.dta
tab eu28
tab eu28, nolab
keep if eu28 == 1
gen year = 2014
keep survey uniqid country eu28 w23 qa8a_11 qa8a_13 year
rename uniqid id
rename eu28 eums
rename w23 weight
rename qa8a_11 trustgov
rename qa8a_13 trusteu
save EUse82fall2014.dta, replace
*
use SE83spring2015.dta
tab eu28
tab eu28, nolab
keep if eu28 == 1
gen year = 2015
keep survey uniqid country eu28 w23 qa8a_6 qa8a_8 year
rename uniqid id
rename eu28 eums
rename w23 weight
rename qa8a_6 trustgov
rename qa8a_8 trusteu
save EUse83spring2015.dta, replace
*
use SE84fall2015.dta
tab eu28
tab eu28, nolab
keep if eu28 == 1
gen year = 2015
keep survey uniqid country eu28 w23 qa8a_8 qa8a_10 year
rename uniqid id
rename eu28 eums
rename w23 weight
rename qa8a_8 trustgov
rename qa8a_10 trusteu
save EUse84fall2015.dta, replace
*
use SE85spring2016.dta
tab eu28
tab eu28, nolab
keep if eu28 == 1
gen year = 2016
keep survey uniqid country eu28 w23 qa8a_7 qa8a_9 year
rename uniqid id
rename eu28 eums
rename w23 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save EUse85spring2016.dta, replace
*
use SE86fall2016.dta
tab eu28
tab eu28, nolab
keep if eu28 == 1
gen year = 2016
keep survey uniqid country eu28 w23 qa8a_12 qa8a_14 year
rename uniqid id
rename eu28 eums
rename w23 weight
rename qa8a_12 trustgov
rename qa8a_14 trusteu
save EUse86fall2016.dta, replace
*
use SE87spring2017.dta
tab eu28
tab eu28, nolab
keep if eu28 == 1
gen year = 2017
keep survey uniqid country eu28 w23 qa8a_7 qa8a_9 year
rename uniqid id
rename eu28 eums
rename w23 weight
rename qa8a_7 trustgov
rename qa8a_9 trusteu
save EUse87spring2017.dta, replace
*
*
* Appending EU (combining to one dataset)
use EUse59spring2003.dta, clear
append using EUse60fall2003.dta, nolab
save EUappended.dta, replace
append using EUse61spring2004.dta, nolab
save EUappended.dta, replace
append using EUse62fall2004.dta, nolab
save EUappended.dta, replace
append using EUse63spring2005.dta, nolab
save EUappended.dta, replace
append using EUse64fall2005.dta, nolab
save EUappended.dta, replace
append using EUse65spring2006.dta, nolab
save EUappended.dta, replace
append using EUse66fall2006.dta, nolab
save EUappended.dta, replace
append using EUse67spring2007.dta, nolab
save EUappended.dta, replace
append using EUse68fall2007.dta, nolab
save EUappended.dta, replace
append using EUse69spring2008.dta, nolab
save EUappended.dta, replace
append using EUse70fall2008.dta, nolab
save EUappended.dta, replace
append using EUse71spring2009.dta, nolab
save EUappended.dta, replace
append using EUse72fall2009.dta, nolab
save EUappended.dta, replace
append using EUse73spring2010.dta, nolab
save EUappended.dta, replace
append using EUse74fall2010.dta, nolab
save EUappended.dta, replace
append using EUse75spring2011.dta, nolab
save EUappended.dta, replace
append using EUse76fall2011.dta, nolab
save EUappended.dta, replace
append using EUse77spring2012.dta, nolab
save EUappended.dta, replace
append using EUse78fall2012.dta, nolab
save EUappended.dta, replace
append using EUse79spring2013.dta, nolab
save EUappended.dta, replace
append using EUse80fall2013.dta, nolab
save EUappended.dta, replace
append using EUse81spring2014.dta, nolab
save EUappended.dta, replace
append using EUse82fall2014.dta, nolab
save EUappended.dta, replace
append using EUse83spring2015.dta, nolab
save EUappended.dta, replace
append using EUse84fall2015.dta, nolab
save EUappended.dta, replace
append using EUse85spring2016.dta, nolab
save EUappended.dta, replace
append using EUse86fall2016.dta, nolab
save EUappended.dta, replace
append using EUse87spring2017.dta, nolab
save EUappended.dta, replace
*
*
generate eudummytrusteu = 0 if trusteu == 2 // Tend not to trust
replace eudummytrusteu = 1 if trusteu == 1 //Tend to trust EU
generate eudummytrustgov = 0 if trustgov == 2 // Tend not to trust
replace eudummytrustgov = 1 if trustgov == 1 //Tend to trust government
*
collapse (mean) eudummytrusteu eudummytrustgov [pweight=weight], by(year) //weight on (united) country level
save EUcollapsed.dta, replace
**
**
**
use GERcollapsed.dta, clear
merge m:m year using FRAcollapsed.dta
save mergedcollapsed.dta, replace
drop _merge
merge m:m year using UKcollapsed.dta
save mergedcollapsed.dta, replace
drop _merge
merge m:m year using POLcollapsed.dta
save mergedcollapsed.dta, replace
drop _merge
merge m:m year using ITAcollapsed.dta
save mergedcollapsed.dta, replace
drop _merge
merge m:m year using DENcollapsed.dta
save mergedcollapsed.dta, replace
drop _merge
merge m:m year using EUcollapsed.dta
save mergedcollapsed.dta, replace
drop _merge
save mergedcollapsed.dta, replace
**
replace eudummytrusteu = eudummytrusteu * 100
replace eudummytrustgov = eudummytrustgov * 100
replace gerdummytrusteu = gerdummytrusteu * 100
replace gerdummytrustgov = gerdummytrustgov * 100
replace fradummytrusteu = fradummytrusteu * 100
replace fradummytrustgov = fradummytrustgov * 100
replace ukdummytrusteu = ukdummytrusteu * 100
replace ukdummytrustgov = ukdummytrustgov * 100
replace POLdummytrusteu = POLdummytrusteu * 100
replace POLdummytrustgov = POLdummytrustgov * 100
replace ITAdummytrusteu = ITAdummytrusteu * 100
replace ITAdummytrustgov = ITAdummytrustgov * 100
replace DENdummytrusteu = DENdummytrusteu * 100
replace DENdummytrustgov = DENdummytrustgov * 100
rename POLdummytrusteu poldummytrusteu
rename ITAdummytrusteu itadummytrusteu
rename DENdummytrusteu dendummytrusteu
save mergedforgraphs.dta, replace
*   
graph twoway (line eudummytrusteu eudummytrustgov year) //Graph 1
*
graph twoway (line gerdummytrusteu fradummytrusteu ukdummytrusteu year) //Graph 2
*
graph twoway (line eudummytrusteu eudummytrustgov gerdummytrusteu fradummytrusteu ukdummytrusteu year) //Graph 3
*





*Merge with extended EB trend file
use ReplicationFile_MeasuringLegitimacy.dta, clear

tab eb_trusteu if country==348 // 1==tend to trust
tab eb_trustgov // 1==tend to trust
tab eb_membrshp
tab country
tab country, nol

preserve
keep if country==250
keep eb_trustgov eb_trusteu year country eb_membrshp_bi
generate fradummytrusteu = 0  if eb_trusteu == 2 // Tend not to trust
replace fradummytrusteu = 0  if eb_membrshp_bi == 0&year<2010 // EC membership a good thing
replace fradummytrusteu = 1 if eb_trusteu == 1 // Tend to trust EU
replace fradummytrusteu = 1 if eb_membrshp_bi == 1&year<2010 // EC membership a good thing
generate fradummytrustgov = 0  if eb_trustgov == 2 // Tend not to trust
replace fradummytrustgov = 1 if eb_trustgov == 1 // Tend to trust government 
collapse (mean) fradummytrusteu fradummytrustgov, by(year)  
save FRAcollapsed_1970_2012.dta, replace

preserve
keep if country==208
keep eb_trustgov eb_trusteu year country eb_membrshp_bi
generate dendummytrusteu = 0  if eb_trusteu == 2 // Tend not to trust
replace dendummytrusteu = 0  if eb_membrshp_bi == 0&year<2010 // EC membership a good thing
replace dendummytrusteu = 1 if eb_trusteu == 1 // Tend to trust EU
replace dendummytrusteu = 1 if eb_membrshp_bi == 1&year<2010 // EC membership a good thing
generate dendummytrustgov = 0  if eb_trustgov == 2 // Tend not to trust
replace dendummytrustgov = 1 if eb_trustgov == 1 // Tend to trust government 
collapse (mean) dendummytrusteu dendummytrustgov, by(year)  
save DENcollapsed_1970_2012.dta, replace

preserve
keep if country==276
generate gerdummytrusteu = 0 if eb_trusteu == 2 // Tend not to trust
replace gerdummytrusteu = 0  if eb_membrshp_bi == 0&year<2010 // EC membership a good thing
replace gerdummytrusteu = 1 if eb_trusteu == 1 // Tend to trust EU
replace gerdummytrusteu = 1 if eb_membrshp_bi == 1&year<2010 // EC membership a good thing
generate gerdummytrustgov = 0 if eb_trustgov == 2 // Tend not to trust
replace gerdummytrustgov = 1 if eb_trustgov == 1 // Tend to trust government
collapse (mean) gerdummytrusteu gerdummytrustgov, by(year)  
save GERcollapsed_1970_2012.dta, replace

preserve
keep if country==826
generate ukdummytrusteu = 0 if eb_trusteu == 2 // Tend not to trust
replace ukdummytrusteu = 0  if eb_membrshp_bi == 0&year<2010 // EC membership a good thing
replace ukdummytrusteu = 1 if eb_trusteu == 1 // Tend to trust EU
replace ukdummytrusteu = 1 if eb_membrshp_bi == 1&year<2010 // EC membership a good thing
generate ukdummytrustgov = 0 if eb_trustgov == 2 // Tend not to trust
replace ukdummytrustgov = 1 if eb_trustgov == 1 // Tend to trust government
collapse (mean) ukdummytrusteu ukdummytrustgov, by(year)  
save UKcollapsed_1970_2012.dta, replace

preserve
keep if country==380
generate itadummytrusteu = 0 if eb_trusteu == 2 // Tend not to trust
replace itadummytrusteu = 0  if eb_membrshp_bi == 0&year<2010 // EC membership a good thing
replace itadummytrusteu = 1 if eb_trusteu == 1 // Tend to trust EU
replace itadummytrusteu = 1 if eb_membrshp_bi == 1&year<2010 // EC membership a good thing
generate itadummytrustgov = 0 if eb_trustgov == 2 // Tend not to trust
replace itadummytrustgov = 1 if eb_trustgov == 1 // Tend to trust government
collapse (mean) itadummytrusteu itadummytrustgov, by(year)  
save ITAcollapsed_1970_2012.dta, replace

preserve
keep if country==616
generate poldummytrusteu = 0 if eb_trusteu == 2 // Tend not to trust
replace poldummytrusteu = 0  if eb_membrshp_bi == 0&year<2010 // EC membership a good thing
replace poldummytrusteu = 1 if eb_trusteu == 1 // Tend to trust EU
replace poldummytrusteu = 1 if eb_membrshp_bi == 2&year<2010 // EC membership a good thing
generate poldummytrustgov = 0 if eb_trustgov == 2 // Tend not to trust
replace poldummytrustgov = 1 if eb_trustgov == 1 // Tend to trust government
collapse (mean) poldummytrusteu poldummytrustgov, by(year)  
save POLcollapsed_1970_2012.dta, replace

preserve
generate eudummytrusteu = 0 if eb_trusteu == 2 // Tend not to trust
replace eudummytrusteu = 0  if eb_membrshp_bi == 0&year<2010 // EC membership a good thing
replace eudummytrusteu = 1 if eb_trusteu == 1 //Tend to trust EU
replace eudummytrusteu = 1 if eb_membrshp_bi == 1&year<2010 // EC membership a good thing
generate eudummytrustgov = 0 if eb_trustgov == 2 // Tend not to trust
replace eudummytrustgov = 1 if eb_trustgov == 1 //Tend to trust government
collapse (mean) eudummytrusteu eudummytrustgov, by(year) 
save EUcollapsed_1970_2012.dta, replace


**
use GERcollapsed_1970_2012.dta
merge m:m year using FRAcollapsed_1970_2012.dta 
drop _merge
merge m:m year using UKcollapsed_1970_2012.dta 
drop _merge
merge m:m year using POLcollapsed_1970_2012.dta 
drop _merge
merge m:m year using ITAcollapsed_1970_2012.dta 
drop _merge
merge m:m year using DENcollapsed_1970_2012.dta 
drop _merge
merge m:m year using EUcollapsed_1970_2012.dta 
drop _merge
save mergedcollapsed_1970_2012.dta, replace
**

replace eudummytrusteu = eudummytrusteu * 100
replace eudummytrustgov = eudummytrustgov * 100
replace gerdummytrusteu = gerdummytrusteu * 100
replace gerdummytrustgov = gerdummytrustgov * 100
replace fradummytrusteu = fradummytrusteu * 100
replace fradummytrustgov = fradummytrustgov * 100
replace ukdummytrusteu = ukdummytrusteu * 100
replace ukdummytrustgov = ukdummytrustgov * 100
replace poldummytrusteu = poldummytrusteu * 100
replace poldummytrustgov = poldummytrustgov * 100
replace itadummytrusteu = itadummytrusteu * 100
replace itadummytrustgov = itadummytrustgov * 100
replace dendummytrusteu = dendummytrusteu * 100
replace dendummytrustgov = dendummytrustgov * 100
save mergedforgraphs_1970_2012.dta, replace



use mergedforgraphs.dta, clear 
append using mergedforgraphs_1970_2012.dta
drop gerdummytrustgov fradummytrustgov ukdummytrustgov poldummytrustgov itadummytrustgov dendummytrustgov eudummytrustgov ///
POLdummytrustgov ITAdummytrustgov DENdummytrustgov
ed
drop in 48/57
sort year
drop in 1/2
ed 
save legitimacy_eu_gov_1970_2017.dta, replace



*Figure 2
use legitimacy_eu_gov_1970_2017.dta, clear
ed
drop if year<2003
set scheme plotplain
graph twoway (line eudummytrusteu dendummytrusteu fradummytrusteu gerdummytrusteu itadummytrusteu poldummytrusteu ukdummytrusteu year), ///
xtitle("") ylabel(0 "0%" 20 "20%" 40 "40%" 60 "60%" 80 "80%" 100 "100%") ///
legend(order(1 "Average, all Eurobarometer countries" 2 "Denmark" 3 "France" 4 "Germany" 5 "Italy" 6 "Poland" 7 "UK" )) ///
saving(Fig2.3.gph, replace) 
 








